<?php
namespace abc777;

class Syslog{



	// 调试日志
	public static function write_log($txt, $suffix=''){
		$file = '/var/www/html/new/d/abc/logs/abc777_debug_'.$suffix.'_'.date('Ymd').'.txt';
		$fp = fopen($file,"a");
		flock($fp, LOCK_EX);
		fwrite($fp,date("Y-m-d H:i:s").":".$txt."\n");
		flock($fp, LOCK_UN);
		fclose($fp);
	}
	
	// 调试日志
	public static function write($txt, $filename=''){
		$file = '/var/www/html/new/d/logs/'.$filename;
		$fp = fopen($file,"a");
		flock($fp, LOCK_EX);
		fwrite($fp,date("Y-m-d H:i:s").":".$txt."\n");
		flock($fp, LOCK_UN);
		fclose($fp);
	}

}